<div class="trouble-detail">
  <!--导航定位-->
  <div class="trouble-detail-title">
    <span class="h5" (click)="backPreviouClick()">隐患处理</span>
        <i class="fa fa-angle-right h4 pl-2 pr-2"></i>
        <span class="h5">隐患处理详情</span>
  </div>
  <div class="trouble-detail-body">
    <form [formGroup]="addReport">
      <div class="ui-g ui-fluid ui-md">
        <div class="ui-g-12 ui-md-12" style="line-height: 4vh">
          <div class="ui-g-1 ui-md-1 right">
            <label><span style="color: #FF8A9A">*</span>公司:</label>
          </div>
          <div class="ui-g-4 ui-md-4 dialog-input">
            <input pInputText type="text" placeholder="请输入公司" formControlName="companyName"/>
          </div>
          <div class="ui-g-1 ui-md-1"></div>
          <div class="ui-g-1 ui-md-1 right">
            <label><span style="color: #FF8A9A">*</span>厂矿:</label>
          </div>
          <div class="ui-g-4 ui-md-4 dialog-input">
            <input pInputText type="text" placeholder="请输入厂矿" formControlName="factoryName"/>
          </div>
        </div>
        <div class="ui-g-12 ui-md-12" style="line-height: 4vh">
          <div class="ui-g-1 ui-md-1 right">
            <label><span style="color: #FF8A9A">*</span>车间:</label>
          </div>
          <div class="ui-g-4 ui-md-4 dialog-input">
            <input pInputText type="text" placeholder="请输入车间" formControlName="workshopName"/>
          </div>
          <div class="ui-g-1 ui-md-1"></div>
          <div class="ui-g-1 ui-md-1 right">
            <label><span style="color: #FF8A9A">*</span>班主:</label>
          </div>
          <div class="ui-g-4 ui-md-4 dialog-input">
            <input pInputText type="text" placeholder="请输入班主" formControlName="className"/>
          </div>
        </div>
<!--        <div class="ui-g-12 ui-md-12" style="line-height: 4vh">-->
<!--          <div class="ui-g-1 ui-md-1 right">-->
<!--            <label><span style="color: #FF8A9A">*</span>单位:</label>-->
<!--          </div>-->
<!--          <div class="ui-g-4 ui-md-4 dialog-input">-->
<!--            <input pInputText type="text" placeholder="请选择组织单位" formControlName="organizationName"/>-->
<!--          </div>-->
<!--        </div>-->
        <div class="ui-g-12 ui-md-12"  style="line-height: 4vh">
          <div class="ui-g-1 ui-md-1 right">
            <label><span style="color: #FF8A9A">*</span>排查时间:</label>
          </div>
          <div class="ui-g-4 ui-md-4 dialog-input">
            <p-calendar [style]="{width: '100%'}" placeholder="请选择排查时间" [monthNavigator]="true" [yearNavigator]="true"
                        dateFormat="yy-mm-dd" yearRange="1700:2200" [locale]="esDate" formControlName="troubleshootingTime" ></p-calendar>
          </div>
        </div>
<!--        <div class="ui-g-12 ui-md-12" style="line-height: 3vh">-->
<!--          <div class="ui-g-1 ui-md-1 right">-->
<!--            <label><span style="color: #FF8A9A">*</span>整改方案:</label>-->
<!--          </div>-->
<!--          <div class="ui-g-2 ui-md-2 dialog-input">-->
<!--            <p-radioButton name="groupnamep" value="有" label="有"  [ngStyle]="{paddingRight: '2vw'}" formControlName="ifRectificationPlan"></p-radioButton>-->
<!--            <p-radioButton name="groupnamep" value="无" label="无" formControlName="ifRectificationPlan"></p-radioButton>-->
<!--          </div>-->
<!--          <div class="ui-g-1 ui-md-1 right">-->
<!--            <label><span style="color: #FF8A9A">*</span>控制措施:</label>-->
<!--          </div>-->
<!--          <div class="ui-g-2 ui-md-2 dialog-input">-->
<!--            <p-radioButton name="groupnames" value="有" label="有"  [ngStyle]="{paddingRight: '2vw'}" formControlName="ifControlMeasures"></p-radioButton>-->
<!--            <p-radioButton name="groupnames" value="无" label="无" formControlName="ifControlMeasures"></p-radioButton>-->
<!--          </div>-->
<!--        </div>-->
        <div class="ui-md-12 ui-g-12"  style="line-height: 4vh">
          <div class="ui-g-1 ui-md-1 right">
            <label><span style="color: #FF8A9A">*</span>隐患类型:</label>
          </div>
          <div class="ui-g-4 ui-md-4 dialog-input left">
            <div class="ui-g-2 ui-g-md-2">
              <p-checkbox name="groupname2" value="人"  label="人" [formControl]="addReport.controls['hidType']" ></p-checkbox>
            </div>
            <div class="ui-g-2 ui-g-md-2">
              <p-checkbox name="groupname2" value="事物"  label="事物" [formControl]="addReport.controls['hidType']"></p-checkbox>
            </div>
            <div class="ui-g-2 ui-g-md-2">
              <p-checkbox name="groupname2" value="管理"  label="管理" [formControl]="addReport.controls['hidType']"></p-checkbox>
            </div>
          </div>
          <div class="ui-g-1 ui-md-1"></div>
          <div class="ui-g-1 ui-md-1 right">
            <label><span style="color: #FF8A9A">*</span>隐患等级:</label>
          </div>
          <div class="ui-g-4 ui-md-4 dialog-input left">
            <p-dropdown dropdownIcon="pi pi-caret-down" placeholder="请选择隐患等级" [options]="hidFradeOption" formControlName="hidDangerGrade"></p-dropdown>
          </div>
        </div>
        <div class="ui-md-12 ui-g-12">
          <div class="ui-g-1 ui-md-1 right">
            <label ><span style="color: #FF8A9A">*</span>隐患描述:</label>
          </div>
          <div class="ui-g-10 ui-md-10">
            <textarea [rows]="5" [cols]="30" pInputTextarea autoResize="autoResize" style="border: 1px solid #D2D6DB" formControlName="hidDangerContent"></textarea>
          </div>
        </div>
        <div class="ui-md-12 ui-g-12" *ngIf="processingStatus === '6'">
          <div class="ui-g-1 ui-md-1 right">
            <label ><span style="color: #FF8A9A">*</span>审核原因:</label>
          </div>
          <div class="ui-g-10 ui-md-10">
            <textarea [rows]="5" [cols]="30" pInputTextarea autoResize="autoResize" style="border: 1px solid #D2D6DB" formControlName="rectificationEvaluate"></textarea>
          </div>
        </div>
        <div class="ui-md-12 ui-g-12">
          <div class="ui-g-1 ui-md-1 right">
            <label ><span style="color: #FF8A9A">*</span>整改意见:</label>
          </div>
          <div class="ui-g-10 ui-md-10">
            <textarea [rows]="5" [cols]="30" pInputTextarea autoResize="autoResize" style="border: 1px solid #D2D6DB" formControlName="rectificationOpinions"></textarea>
          </div>
        </div>
        <div class="ui-md-12 ui-g-12">
          <div class="ui-g-1 ui-md-1 right">
            <label ><span style="color: #FF8A9A">*</span>隐患现场情况:</label>
          </div>
          <div class="ui-g-10 ui-md-10">
            <app-upload-image  #upimg [ImageOption]="ImageOption"></app-upload-image>
          </div>
        </div>
        <div style="width: 100%;height: 2px; background: #F6F6F9"></div>
        <div class="ui-g-12 ui-md-12" style="line-height: 3vh">
          <div class="ui-g-1 ui-md-1 right">
            <label><span style="color: #FF8A9A">*</span>是否处理:</label>
          </div>
          <div class="ui-g-2 ui-md-2 dialog-input" >
            <p-radioButton name="groupname1" value="是" label="是"  [ngStyle]="{paddingRight: '2vw'}" (onClick)="selectHandleType(1)" formControlName="ifDeal" [disabled]="this.btnList.length === 0"></p-radioButton>
            <p-radioButton name="groupname1" value="否" label="否" (onClick)="selectHandleType(0)" formControlName="ifDeal" [disabled]="this.btnList.length === 0"></p-radioButton>
          </div>
        </div>
        <div class="ui-g-12 ui-md-12"  style="line-height: 4vh" *ngIf="isHandle">
          <div class="ui-g-1 ui-md-1 right">
            <label><span style="color: #FF8A9A">*</span>治理资金:</label>
          </div>
          <div class="ui-g-4 ui-md-4 dialog-input">
            <input pInputText type="text" placeholder="请输入治理资金(万元)" formControlName="governanceFunds"/>
          </div>
        </div>
        <div class="ui-g-12 ui-md-12"  style="line-height: 4vh" *ngIf="isHandle">
          <div class="ui-g-1 ui-md-1 right">
            <label><span style="color: #FF8A9A">*</span>完成时间:</label>
          </div>
          <div class="ui-g-4 ui-md-4 dialog-input">
            <p-calendar [style]="{width: '100%'}" placeholder="请选择完成时间" [monthNavigator]="true" [yearNavigator]="true"
                        dateFormat="yy-mm-dd" yearRange="1990:2200" [locale]="esDate" formControlName="completionTime"></p-calendar>
          </div>
        </div>
        <div class="ui-md-12 ui-g-12" *ngIf="isHandle">
          <div class="ui-g-1 ui-md-1 right">
            <label > <span style="color: #FF8A9A">*</span>完成情况:</label>
          </div>
          <div class="ui-g-10 ui-md-10">
            <textarea [rows]="5" [cols]="30" pInputTextarea autoResize="autoResize" style="border: 1px solid #D2D6DB" formControlName="completionSituation"></textarea>
          </div>
        </div>
        <div class="ui-md-12 ui-g-12" style="line-height: 3vh" *ngIf="isHandle && !this.isDownLoadStatus">
          <div class="ui-g-1 ui-md-1 right">
            <label >整改方案:</label>
          </div>
          <div class="ui-g-4 ui-md-4 dialog-input">
            <div class="ui-inputgroup" style="position: relative">
              <input type="text" pInputText placeholder="请选择整改方案" formControlName="plan" >
              <button pButton type="button" icon="pi pi-folder" class="ui-button-warn" style="background: #F8F8F8;border: 1px solid #E0E3E7;border-left: 0;color: #E0E3E7"></button>
              <input type="file" style="position: absolute;width: 35px;right: 0;height: 34px;opacity: 0" (change)="selectFile($event, 'plan')">
            </div>
          </div>
          <div class="ui-g-1 ui-md-1"></div>
          <div class="ui-g-1 ui-md-1 right">
            <label >验收报告:</label>
          </div>
          <div class="ui-g-4 ui-md-4 dialog-input">
            <div class="ui-inputgroup" style="position: relative">
              <input type="text" pInputText placeholder="请选择验收报告" formControlName="report" >
              <button pButton type="button" icon="pi pi-folder" class="ui-button-warn" style="background: #F8F8F8;border: 1px solid #E0E3E7;border-left: 0;color: #E0E3E7"></button>
              <input type="file" style="position: absolute;width: 35px;right: 0;height: 34px;opacity: 0" (change)="selectFile($event, 'report')">
            </div>
          </div>
        </div>
        <div class="ui-md-12 ui-g-12" style="line-height: 3vh" *ngIf="isHandle && this.isDownLoadStatus">
          <div class="ui-g-1 ui-md-1 right">
            <label >整改方案:</label>
          </div>
          <div class="ui-g-4 ui-md-4 dialog-input">
            <div class="ui-inputgroup" style="position: relative">
              <input type="text" pInputText placeholder="请选择整改方案" formControlName="plan" disabled>
              <button pButton type="button" icon="pi pi-download" class="ui-button-warn" style="background: #F8F8F8;border: 1px solid #E0E3E7;border-left: 0;color: #E0E3E7" (click)="downLoadFile('plan')"></button>
<!--              <input type="file" style="position: absolute;width: 35px;right: 0;height: 34px;opacity: 0" (change)="selectFile($event, 'plan')">-->
            </div>
          </div>
          <div class="ui-g-1 ui-md-1"></div>
          <div class="ui-g-1 ui-md-1 right">
            <label >验收报告:</label>
          </div>
          <div class="ui-g-4 ui-md-4 dialog-input">
            <div class="ui-inputgroup" style="position: relative">
              <input type="text" pInputText placeholder="请选择验收报告" formControlName="report" disabled>
              <button pButton type="button" icon="pi pi-download" class="ui-button-warn" style="background: #F8F8F8;border: 1px solid #E0E3E7;border-left: 0;color: #E0E3E7" (click)="downLoadFile('report')"></button>
<!--              <input type="file" style="position: absolute;width: 35px;right: 0;height: 34px;opacity: 0" (change)="selectFile($event, 'report')">-->
            </div>
          </div>
        </div>
        <div class="ui-md-12 ui-g-12" *ngIf="isHandle">
          <div class="ui-g-1 ui-md-1 right">
            <label ><span style="color: #FF8A9A">*</span>排查后隐患现场情况:</label>
          </div>
          <div class="ui-g-10 ui-md-10">
            <app-upload-image (selectFile)="selectImageFile($event, 'afterImg')" #upimg [ImageOption]="ImageOptionAfter"></app-upload-image>
          </div>
        </div>
      </div>
    </form>
  </div>
  <div class="trouble-detail-fotter">
    <button pButton type="button" [label]="item.botton" class="ui-button-rounded" (click)="submitClcik(item.botton)" *ngFor="let item of btnList"></button>
  </div>
  <p-dialog header="审核内容" [(visible)]="showReViewDialog" [style]="{width: '700px'}">
    <div class="ui-g ui-md ui-fiuld">
      <div class="ui-g-12 ui-md-12">
        <div class="ui-g-2 ui-md-2"></div>
        <div class="ui-g-8 ui-md-8" style="line-height: 4.4vh">
          <div class="ui-g-4 ui-md-4 right">
            <span style="color: #FF8A9A">*</span>整改评估：
          </div>
          <div class="ui-g-8 ui-md-8 ">
            <div class="ui-md-12 ui-g-12 dialog-input" style="text-align: left">
              <textarea [rows]="5" [cols]="30" pInputTextarea autoResize="autoResize" style="border: 1px solid #D2D6DB" [(ngModel)]="rectificationEvaluate"></textarea>
            </div>
          </div>
        </div>
      </div>
    </div>

    <p-footer>
      <button class="dialog-btn" (click)="showReViewDialog = false">取消</button>
      <button class="dialog-btn" (click)="reviewToPassClick()">确认选择</button>
    </p-footer>
  </p-dialog>
</div>
